package com.example.serviceDriverUser.controller;

import com.example.internalcommon.dto.ResponseResult;
import com.example.serviceDriverUser.service.CityDriverUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author lyra
 * @Date 2023/4/26 9:21
 **/
@RestController
@RequestMapping("/city-code")
public class CityDriverController {
    @Autowired
    private CityDriverUserService cityDriverUserService;

    /**
     * 40.根据当前城市码查询该地是否有司机
     * @param cityCode
     * @return
     */
    @GetMapping("/is-available-driver")
    public ResponseResult isAvailableDriver(String cityCode){
        return cityDriverUserService.isAvailableDriver(cityCode);
    }
}
